package com.netease.nie.base.data;


/**
 * 
 * @author KingsHunter
 * @createDate June 15th,2016
 * 
 */
public class DynamicDataSourceContextHolder {

	private static final ThreadLocal<DBOperType> contextHolder = new ThreadLocal<>();

	public static void setDatabaseType(DBOperType type) {
		contextHolder.set(type);
	}

	public static DBOperType getDatabaseType() {
		DBOperType dbOperType = contextHolder.get();
		return dbOperType;
	}

	public static void clearDatabaseType() {
		contextHolder.remove();
	}
}
